package param

import "myserver/model"

type UserParam struct {
	UserName string `json:"user_name"`
	Phone    string `json:"phone"`
}

type UserParam01 struct {
	UserName string `form:"user_name" json:"user_name" binding:"required"`
	Password string `form:"password" json:"password" binding:"required"`
}

func ToUserDto(user model.User) UserParam {
	return UserParam{
		UserName: user.UserName,
		Phone:    user.Phone,
	}
}
